package com.yty.demo._4_oop;

import java.util.Arrays;

/**
 * @author: yangtaoyao
 * @time: 2020/1/7 13:26
 * @description:
 */
public class Student {
    private String name;
    private int age;

    private String[] course;
    private String[] hobby;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String[] getCourse() {
        return course;
    }

    public void setCourse(String[] course) {
        this.course = course;
    }

    public String[] getHobby() {
        return hobby;
    }

    public void setHobby(String[] hobby) {
        this.hobby = hobby;
    }

    public String showInfo() {
        return "学生信息：{" +"\n" +
                "name:'" + name + "\'\n" +
                "age:" + age +"\n" +
                "course:" + Arrays.toString(course) +"\n" +
                "hobby:" + Arrays.toString(hobby) +"\n" +
                '}';
    }

    public static void main(String[] args) {
        Student t =new Student();
        t.setAge(20);
        t.setName("李同学");
        String[] courses={"C语言","java"};
        String[] hobbies={"打篮球","玩游戏"};
        t.setCourse(courses);
        t.setHobby(hobbies);
        System.out.println(t.showInfo());
    }
}
